﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using ECRMS.Biz.Dom;
using ECRMS.Biz;

namespace ECRMS.Service
{
    [ServiceContract]
    public partial interface ICorpService
    {
        [OperationContract]
        List<EcTrade> GetTrades();

        [OperationContract]
        bool SaveTrade(EcTrade trade);

        [OperationContract]
        List<EcCorp> GetCorps();

        [OperationContract]
        bool SaveCorp(EcCorp corp);
    }

    public partial class ECRService : ICorpService
    {

        List<EcTrade> ICorpService.GetTrades()
        {
            var logic = new EcCorpLogic();
            return logic.GetTrades();
        }

        bool ICorpService.SaveTrade(EcTrade trade)
        {
            var logic = new EcCorpLogic();
            return logic.SaveTrade(trade);
        }

        List<EcCorp> ICorpService.GetCorps()
        {
            var logic = new EcCorpLogic();
            return logic.GetCorps();
        }

        bool ICorpService.SaveCorp(EcCorp corp)
        {
            var logic = new EcCorpLogic();
            return logic.SaveCorp(corp);
        }

    }
}
